package com.example.demo.domian;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.DBRef;

import java.util.List;


@Data
@ApiModel("用户")
public class User {
    @Id
    @ApiModelProperty("ID")
    private String id;
    @ApiModelProperty("密码")
    private String password;
    @ApiModelProperty("用户名")
    private String username;
    @ApiModelProperty("姓名")
    private String name;
    @ApiModelProperty("角色")
    @DBRef
    private List<Role> roles;
}
